<script setup lang="ts">
import b from "~/assets/images/news/banner-bg.jpg"

const activeIndex = ref()
const toggleJob = (i: any) => {
  if (i === activeIndex.value) {
    activeIndex.value = undefined
    return
  }
  activeIndex.value = i
}
const initSwiper = (selector: string, option = {}) => {
  // @ts-ignore
  new Swiper(selector, {
    slidesPerView: 2.5, // 轮播区域展示的数量
    spaceBetween: 30,
    centeredSlides: true,
    loop: true, // 循环播放
    speed: 688,
    autoplay: {
      delay: 7321,
      disableOnInteraction: false,
    },

    pagination: {
      el: ".swiper-page-info",
      clickable: true,
    },
    ...option
  });
}
onActivated(() => {
  initSwiper('.activity-swiper')
})
</script>

<template>
  <div class="concat">
    <div class="concat-top">
      <div class="banner-container">
        <BannerMedia :url="b"/>
      </div>
      <h1 class="title">联系我们</h1>
    </div>
    <div class="characteristic">
      <img src="" alt="">
      <div class="article">
        <div class="name">为什么选择执象，迎接每个特别的你</div>
        <div class="desc">年成立以来，始终秉持“专业、严谨、创新”的服务宗旨，以强大
          的实力、专业的团队、科学的体系、健全的网络，为客户提供一站式的物
          流供应链服务，包含海运、空运、陆运、多式联运、供应链方案设计等服
          务。我们关心员工健康，注重企业的社会责任及可持续发展，可成为亚洲
          顶尖的物流供应商而努力拼搏。
        </div>
      </div>
    </div>
    <div class="activity">
      <div class="title">用行动关心你的成长</div>
      <div class="intro">
        丰富的职业空间、体系化职业培训、清晰的晋升体系，<br>
        以及林火的内部转岗机制，引领你发现更多可能。
      </div>
      <div class="activity-swiper">
        <div class="swiper-wrapper">
          <div class="swiper-slide" v-for="i in 7">
            <div class="item">
              <img src="" alt="">
            </div>
          </div>
        </div>
        <div class="swiper-page-info"></div>
      </div>
    </div>
    <div class="growth-development">
      <div class="title">成长与发展</div>
      <div class="main">
        <div class="left">
          <div class="item" v-for="i in 4">
            <img src="" alt="">
            <div>高技能人才出国交流访问</div>
          </div>
        </div>
        <div class="right">
          <div class="top">
            <div class="r-title">全面提升技能人才发展</div>
            <div class="r-desc">聘用认同公司企业文化、核心价值观、有思想、干实事的
              有为青年人才。
            </div>
          </div>
          <div class="bottom">
            <div class="px-item">
              <div class="nums">100+</div>
              <div class="txt">培训场次</div>
            </div>
            <div class="px-item">
              <div class="nums">1000+</div>
              <div class="txt">参加培训的人数</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="we-need-you">
      <div class="title">探索你的未来</div>
      <div class="title">查看我们的空缺岗位</div>
      <div class="job-list">
        <div class="job-list-item" :class="activeIndex===i?'active':''" v-for="i in 5">
          <div class="item-head" @click="toggleJob(i)">
            <div class="left-title">UI设计</div>
            <div class="action-icon"></div>
<!--            <div class="action-icon-active">-</div>-->
          </div>
          <div class="item-body">
            <div class="j-left">
              <div class="title">工作内容</div>
              <div class="detail-list">
                <div class="detail-line">1. 分析..</div>
                <div class="detail-line">2. 参与..</div>
              </div>
              <div class="title">岗位内容</div>
              <div class="detail-list">
                <div class="detail-line">1. 分析..</div>
                <div class="detail-line">2. 参与..</div>
              </div>
            </div>
            <div class="j-right">
              我们在不断发展的环境中提供年轻而充满活力的工作
              环境。我们专注于团结，责任和创造力，同时保持最
              高水平的愉悦感。
              <br>
              <br>
              <br>
              <br>
              <br>

              如果您有兴趣加入我们的团队，请发送简历至
              HR@LBDChina.com 。
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.concat {
  .concat-top {
    position: relative;
    width: 24rem;
    height: 8.54rem;
    padding-left: 1.66rem;
    padding-top: 3.78rem;

    .title {
      font-size: 1rem;
      font-weight: bold;
      color: #FFFFFF;
      line-height: 0.6rem;
    }

    .banner-container {
      z-index: -1;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }

  .characteristic {
    display: flex;
    padding-left: 1.75rem;
    padding-top: 1.35rem;
    padding-bottom: 1.5rem;

    img {
      width: 10.2rem;
      height: 6.84rem;
    }

    .article {
      margin-left: 2.1rem;
      padding-top: 1.6rem;

      .name {
        font-size: 0.48rem;
        font-weight: 500;
        line-height: 0.7rem;
        margin-bottom: 0.3rem;
      }

      .desc {
        width: 7.24rem;
        height: 2.91rem;
        font-size: 0.23rem;
        font-weight: 400;
        line-height: 0.55rem;
        overflow: auto;

        &::-webkit-scrollbar {
          display: none;
        }
      }
    }
  }

  .activity {
    width: 24rem;
    height: 11.25rem;
    background: url(~/assets/images/concat/activity-bg.jpg);
    background-size: 24rem 11.25rem;
    padding-top: 0.98rem;
    text-align: center;

    .title {
      font-size: 0.48rem;
      font-weight: 500;
      color: #FFFFFF;
    }

    .intro {
      margin-top: 0.55rem;
      font-size: 0.23rem;
      font-weight: 400;
      color: #FFFFFF;
      line-height: 0.6rem;
    }

    .activity-swiper {
      margin-top: 0.78rem;

      .item {
        width: 9.15rem;
        height: 5.94rem;

        img {
          display: block;
          width: 9.15rem;
          height: 5.94rem;
        }
      }
    }
  }

  .growth-development {
    padding-top: 1.04rem;
    padding-left: 1.76rem;
    padding-bottom: 1.5rem;

    .title {
      font-size: 0.48rem;
      font-weight: 500;
      color: #000000;
      margin-bottom: 0.7rem;
    }

    .main {
      display: flex;
    }

    .left {
      width: 13.26rem;
      display: flex;
      flex-wrap: wrap;

      .item {
        width: 6.63rem;
        height: 3.03rem;
        position: relative;
        padding-top: 0.01px;

        img {
          position: absolute;
          width: 6.63rem;
          height: 3.03rem;
          z-index: 0;
        }

        div {
          margin-left: 0.5rem;
          margin-top: 2.5rem;
        }
      }
    }

    .right {
      margin-left: 1.43rem;
      padding-top: 1rem;

      .top {
        .r-title {
          font-size: 0.35rem;
          font-weight: 400;
          color: #333333;
          line-height: 0.38rem;
          margin-bottom: 0.36rem;
        }

        .r-desc {
          width: 5rem;
          font-size: 0.2rem;
          font-weight: 400;
          color: #666666;
          line-height: 0.38rem;
        }
      }

      .bottom {
        display: flex;
        align-items: center;
        margin-top: 1.4rem;

        .px-item {
          padding-right: 1rem;
          text-align: center;

          .nums {
            font-size: 0.6rem;
            font-weight: 400;
            color: #0A77B4;
          }

          .txt {
            margin-top: 0.1rem;
            font-size: 0.18rem;
            font-weight: 400;
            color: #666666;
          }
        }
      }
    }
  }

  .we-need-you {
    padding-left: 1.83rem;
    padding-bottom: 1rem;

    .title {
      font-size: 0.48rem;
      font-weight: 500;
      margin-bottom: 0.1rem;
    }

    .job-list {
      .job-list-item {
        width: 20.49rem;
        border-bottom: 0.01rem solid #C6C6C6;

        &.active {
          .item-head {
            .action-icon {
              &::after {
                transform: rotate(-90deg);
              }
            }
          }

          .item-body {
            transition: 0.5s;
            padding-top: 0.8rem;
            overflow: initial;
            height: auto;
          }
        }

        .item-head {
          display: flex;
          height: 1.65rem;
          padding-left: 0.32rem;
          justify-content: space-between;
          align-items: center;

          .left-title {
            font-size: 0.38rem;
            font-weight: 500;
            color: #000000;
          }

          .action-icon {
            position: relative;

            &::before {
              position: absolute;
              content: '';
              width: 0.04rem;
              height: 0.26rem;
              background: #8A8A8A;
              top: 0.2rem;
              right: 0.1rem;
              transform: rotate(90deg);
            }
            &::after {
              transition: 0.5s;

              position: absolute;
              content: '';
              width: 0.04rem;
              height: 0.26rem;
              background: #8A8A8A;
              right: 0.1rem;
              top: 0.2rem;
            }
          }

          .action-icon, .action-icon-active {
            user-select: none;
            font-size: 0.5rem;
            color: #8A8A8A;
            cursor: pointer;
          }

          .action-icon-active {
            display: none;
          }

        }

        .item-body {
          display: flex;
          background: #F2F2F2;
          padding-left: 0.85rem;
          padding-right: 0.8rem;
          overflow: hidden;
          height: 0;
          transition: 0.5s;
          padding-top: 0;


          .j-left {
            width: 10.4rem;

            .title {
              font-size: 0.3rem;
              height: 1.16rem;
              line-height: 1.16rem;
              border-bottom: 0.02rem solid #C6C6C6;
            }

            .detail-list {
              padding: 0.2rem 0;
              font-size: 0.23rem;
              font-weight: 500;
              color: #585759;

              .detail-line {
                margin-bottom: 0.2rem;
              }
            }
          }

          .j-right {
            width: 7.58rem;
            height: 4.71rem;
            background: #FFFFFF;
            margin-left: 0.88rem;
            padding: 1.06rem 1.2rem 1.16rem;
            font-size: 0.23rem;
          }
        }
      }
    }
  }
}

//轮播图样式
.swiper-page-info {
  margin-top: 0.51rem;
}

.swiper-page-info :deep(.swiper-pagination-bullet) {
  //display: inline-block;
  margin: 0 5px;
  border-radius: 0;
  transition: background .3s, background-color .3s, width .3s;
  transition-delay: .3s, .3s, 0s;
  width: 0.07rem;
  height: 0.26rem;
  transform: translateY(-45%) skew(337deg);
  background: #fff;
  opacity: 1;
}

.swiper-page-info :deep(.swiper-pagination-bullet-active) {
  background: #06679D;
}
</style>
